package org.summerframework.component.security.role.service.dto;

import org.summerframework.core.base.dto.BaseDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.validator.constraints.Length;

import java.time.LocalDateTime;
import java.util.List;

/**
 * user_role
 * @author
 */
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Data
@EqualsAndHashCode(callSuper = true)
public class UserRoleDTO extends BaseDTO {
    /**
     * 角色名称
     */
    @ApiModelProperty(value = "角色名称", required = true)
    @Length(max = 20, message = "角色名称长度不可超过20")
    private String name;

    /**
     * 角色编码
     */
    @ApiModelProperty(value = "角色编码", required = true)
    private String code;

    /**
     * 角色类型
     */
    @ApiModelProperty(value = "角色类型")
    private Integer type;


    /**
     * 角色类型关联的id
     */
    @ApiModelProperty(value = "角色类型关联的id")
    private Long relId;

    /**
     * 状态  1: 正常  0: 禁用
     */
    @ApiModelProperty(value = "状态  1: 正常  0: 禁用")
    private Integer status;

    /**
     * 是否删除
     */
    @ApiModelProperty(value = "是否删除")
    private Integer delFlag;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人", required = true)
    private Long createBy;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人", required = true)
    private Long updateBy;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间", required = true)
    private LocalDateTime updateTime;

    private List<Long> permissionsIds;

    @ApiModelProperty(value = "是否是系统", required = true)
    private Integer isSystem;
}
